<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<c:choose>
	<c:when test="${not empty showDoingProduct }">
		<title>【图】妈妈推荐：${fn:substring(showDoingProduct.name,0,20)} - 果果街</title>
	</c:when>
	<c:otherwise>
		<title>【图】妈妈推荐：${fn:substring(doing.content,0,20)} - 果果街</title>
	</c:otherwise>
</c:choose>
<meta name="keywords" content="果果,果果街,果果网,童装, 淘宝网童装,孕妇装,洗护用品, 母婴用品,儿童美食,家居 ,亲子早教" />
<meta name="description" content="<c:out value="${fn:substring(doing.content,0,20)}" /> – 果果街网友@${doing.memberName}分享" />
<%@include file="../common/css.jsp" %>
<%@include file="../common/js.jsp" %>
<link href="css/v3/other/other.css" type="text/css" rel="stylesheet" />


</head>
<body>
<!-- header -->
	<%@include file="../common/header.jsp" %>
<!-- header-end -->

<!-- content-->
<div class="w100p">

	<!-- content_v3body -->
    <div class="w980 mg clearfix">
    	<!-- leftcpshow-->
    	<div class="fl cpmainwrap_v3">
        	<div class="boxhead_v3 mg pr h5">
                <span class="lt"></span>
                <span class="rt"></span>	
        	</div>
            <div class="wrap_v3">
            	<div class="mt15 ml15 mr15 mb15">
                	<div class="clearfix">
                    	<div class="fl mr10 picshow_v3">
                        	<div class="pr pic_v3">
                        		<c:if test="${not empty showDoingProduct && empty pictureId || not empty productId}">
	                        		<a href="outLink.htm?id=${showDoingProduct.identifier }" target="_bank" class="block" rel="nofollow"><img alt="${showDoingProduct.name}" src="${showDoingProduct.imageServer }${showDoingProduct.picThumb }_468xXXX.jpg" width="320" class="block picview_v3" /></a>
	                                <a href="javascript:;" picType="2" picproId="${showDoingProduct.identifier}"  class="add_to_album_btn" target="_bank"></a>
                                </c:if>
                                <c:if test="${empty showDoingProduct && not empty showDoingPicture && empty pictureId || not empty pictureId}">
	                        		<a href="${showDoingPicture.imageServer}${showDoingPicture.pictureThumbnail}_468xXXX.jpg" target="_bank" class="block"><img  src="${showDoingPicture.imageServer }${showDoingPicture.pictureThumbnail}_468xXXX.jpg" width="320" class="block picview_v3" /></a>
	                                <a href="javascript:;" picType="1" picproId="${showDoingPicture.identifier}"  class="add_to_album_btn" target="_bank"></a>
                                </c:if>
                            </div>
                            <!-- 相关分享 -->
                            <ul class="ml10 mt10 clearfix">
                            	<c:if test="${not empty doing.doingProductList }">
								<c:forEach items="${doing.doingProductList }" var="product">
									<c:if test="${product.identifier!=showDoingProduct.identifier }">
										<li class="fl">
                                			<a href="dt.htm?pro=${product.identifier}" class="block">
                                			<img src="${product.imageServer }${product.picThumb }_200xXXX.jpg" width="100" height="100" title="${product.name}" alt="${product.name }" class="block" /></a>
                                		</li>
									</c:if>
								</c:forEach>
								</c:if>
								<c:if test="${not empty doing.doingPictureList }">
								<c:forEach items="${doing.doingPictureList }" var="pic">
									<c:if test="${showDoingPicture.identifier!=pic.identifier }">
										<li class="fl">
                                			<a href="dt.htm?pic=${pic.identifier}" class="block">
                                			<img src="${pic.imageServer }${pic.pictureThumbnail }_200xXXX.jpg" width="100" height="100"  class="block" /></a>
                                		</li>
									</c:if>
								</c:forEach>
								</c:if>
                            </ul>
                        </div>
                        
                        <div class="fl content_v3">
                        	<h1 class="ml10 lh150 fn f14 mt15">
                            	${doing.replaceContent }
                            </h1>
                            <div class="clearfix ml10 mt40">
                                <span class="pinkheart_v3 fl mr5 block"></span>
                                	<div class="fl mr10">
	                                	<c:if test="${sessionScope.member != null}">
	                                		<a href="javascript:void(0);" onclick="GUOGUO.loveDoing('${doing.identifier}','${doing.owner }',this)" class="fc9">喜欢</a>
	                                	</c:if>
	                                	<c:if test="${sessionScope.member == null}">
	                                	 <a href="javascript:void(0);" onclick="GUOGUO.memberLogin()" class="fc9">喜欢</a>
	                                	</c:if>
                                		<i>(</i><span class="unl">${doing.doingLoveCount }</span><i>)</i>
                                	</div>
                                <span class="share_v3 fl clearfix">
                                	<i class="fc9 mr10 fl">分享到</i>
                                	<a href="shareWeibo.htm?id=${doing.identifier }&shareType=01" class="mr5 fl" target="_blank"><img src="images/v3/smallpic/sinawb.png"  /></a>
                                	<a href="shareWeibo.htm?id=${doing.identifier }&shareType=03" class="mr5 fl" target="_blank"><img src="images/v3/smallpic/qqwb.png"  /></a>
                                </span>
                        	</div>
                        	<c:if test="${not empty showDoingProduct && empty pictureId || not empty productId}">
	                            <div class="cpbuyinfo_v3 mt40">
	                            	<div class="mt15 mb15 ml10 mr10">
	                                	<span class="fb black block">点这里购买：</span>
	                                    <a href="outLink.htm?id=${showDoingProduct.identifier }" class="f14 fb ff6699 mt10 block unl" rel="nofollow" target="_blank">${showDoingProduct.name }</a>
	                                    <span class="block mt10 priceshow_v3">
	                                    	<i class="price_v3">￥${showDoingProduct.price }</i>
	                                    </span>
	                                </div>
	                            </div>
                            </c:if>
                        </div>
                    </div>
                    <!-- comment_v3-->
                    <div class="comment_v3 mt40 ml10">
                    	<input type="hidden" id="reply_comment_id" />
                    	<textarea id="commentText" title="输入框"></textarea>
                        <div class="mt5 clearfix">
                        	<div class="fr">
                            	<input type="checkbox" id="ck_forward" />
                                <span>传给我的粉丝</span>
                                <a href="javascript:;" onclick="commentDoing();"><img src="images/v3/smallpic/commentBtn.png" /></a>
                            </div>
                           <%@include file="../common/expression.jsp"%>
                        </div>
                        
                    </div>
                    <!-- comment_v3--end-->
                    <!-- message_v3-->
                    <div class="message_v3 clearfix" id="div_doing_comment"></div>
                    <!-- message_v3--end-->
                </div>
                
            </div>
            <div class="boxfoot_v3 mg pr h5">
                <span class="lb"></span>
                <span class="rb"></span>	
        	</div>
        </div>
        <!-- leftcpshow--end-->
        
        <!-- rightotherinfo_v3-->
        <div class="fr rightinfo_v3">
        	<div class="boxhead_v3 mg pr h5">
                <span class="lt"></span>
                <span class="rt"></span>	
        	</div>
            <div class="wrap_v3">
            	<div class="mt10 ml5 mr5 mb10">
            		<c:if test="${not empty otherLoveList }">
	                	<div class="ml5 mr5">
	                    	<h1 class="ff6699 f14 fn ml5">他们也喜欢</h1>
	                        <ul class="clearfix mt10 mb10">
	                        <c:forEach items="${otherLoveList }" var="pro">
								<li class="fl mr5 mb5">
	                            	<a href="dt.htm?pro=${pro.identifier}" class="block"><img src="${pro.imageServer }${pro.picThumb }_100x100.jpg" width="77" height="77" alt="${pro.name }" title="${pro.name }"/> </a>
	                            </li>
							</c:forEach>
	                        </ul>
	                    </div>
	                    <div class="separate_v3"></div>
                    </c:if>
                    <div class="ml5 mr5 mt10">
                    	<h1 class="ff6699 f14 fn ml5">推荐者</h1>
                        <div class="mb10 clearfix mt10">
                            <a target="_blank" nickname="${doing.memberName}" href="cover.htm?fid=${doing.owner}" class="block fl mr5"><img src="${doing.memberImageServer}${doing.memberAvatar}" width="49" height="49" /></a>
                            <c:if test="${member.family!=doing.owner }">
	                            <div class="fl">
	                                <a target="_blank" nickname="${doing.memberName}" href="cover.htm?fid=${doing.owner}" class="ff6699 lh150">${family.nickname}</a>
	                                <c:if test="${isFollow==0}">
	                                	<a id="a_addFollow" href="javascript:void(0);" class="addgz_v3 mt5" onclick="addFollow();">+关注</a>
	                                </c:if>
	                                <c:if test="${isFollow==1}">
	                                	<p id="cancelFollow">
	                                	<span  class="alreadygz_v3 mt5 fl hovershadow">已关注</span>
	                                	<a href="javascript:void(0)" onclick="cancelFollow()" class="fl mt5 ml5 fc9" style="height: 20px;display: block;line-height: 20px;">取消</a>
	                                	</p>
	                                 </c:if>
	                            </div>
                            </c:if>
                        </div>
                        <div class="mb10">
                        	<span class="fc9">关注</span><a href="follow.htm?family=${family.doorplate}" class="ml5 mr5  ff6699">${family.followCount }</a>
                        	<span class="fc9">粉丝</span><a href="fans.htm?family=${family.doorplate}" class="ml5 mr5  ff6699">${family.fansCount }</a>
                        	<span class="fc9">被喜欢</span><a href="javascript:;" class="ml5 mr5  ff6699">${family.loveCount }</a>
                        </div>
                    </div>
                    <div class="separate_v3"></div>
                    
                    
                    
                    <c:if test="${not empty adList }">
						<div class="otherinfo_v3 mt15">
							<c:forEach items="${adList}" var="ad">
								<div class="clearfix mb15">
		                            <span class="ff6699 fl">【${ad.title}】</span><a target="_blank" href="${ad.hyperlink}" class="fl title lh120">${ad.description}</a>
		                        </div>
							</c:forEach>
	                    </div>
					</c:if>
                </div>
            </div>
            <div class="boxfoot_v3 mg pr h5">
                <span class="lb"></span>
                <span class="rb"></span>	
        	</div>
        </div>
        <!-- rightotherinfo_v3--end-->
        
    </div>
    <!-- content_v3body--end -->
 	<!-- fanye-->
   
    <!-- fanye--end-->
</div>
<!-- content--end-->


<!-- foot-->
<%@include file="../common/footer.jsp" %>
<!-- foot--end-->
<script type="text/javascript" src="js/web2/joinPictorial.js"></script>

<script type="text/javascript">
    $(function() {
        //加载评论
        $("#div_doing_comment").load("getDoingComment.htm?doingId=${doing.identifier}");
        //转发
        $("#post_forward").click(function() {
            GUOGUO.doingForwardDialog(this);
        });

    });
    //增加关注
    function addFollow() {
    	if(GUOGUO.checkLogin()){
    		var follow = "${family.doorplate}";
            $.post("addFollow.htm", {
                follow: follow
            },
            function(data) {
                if (data == 'success') {
                    $("#a_addFollow").after('<p id="cancelFollow"><span  class="alreadygz_v3 mt5 fl hovershadow">已关注</span><a href="javascript:void(0)" onclick="cancelFollow()" class="fl mt5 ml5 fc9" style="height: 20px;display: block;line-height: 20px;">取消</a></p>').remove();
                    
                }
            });
    	}else{
    		GUOGUO.memberLogin();
    	}
        
    }
    //取消关注
    function cancelFollow() {
        var follow = "${family.doorplate}";
        $.post("cancelFollow.htm", {
            follow: follow
        },
        function(data) {
            if (data == 'success') {
               $("#cancelFollow").after('<a id="a_addFollow" href="javascript:void(0);" class="addgz_v3 mt5" onclick="addFollow();">+关注</a>').remove();
			}
        });
    }
    //评论
    function commentDoing() {
    	if(GUOGUO.checkLogin()){
    		var doingId = "${doing.identifier}";
            var reply_comment_id = $("#reply_comment_id").val();
            var commentText = $("#commentText").val();
            if (commentText == "") {
                alert("请输入评论内容");
                return;
            }
        //    var commentCount = parseInt($("#comment_count").text());
            var isForward = document.getElementById("ck_forward").checked;
            $.post("addDoingComment.htm", {
                'commentId': doingId,
                'content': commentText,
                'commentIdType': "doingid",
                'toFamily': '${doing.owner}',
                'isForward': isForward,
                'replyCommentId': reply_comment_id
            },
            function(data) {
                $("#commentText").val("");
             //   $("#comment_count").text(commentCount + 1);
                $("#div_doing_comment").load("getDoingComment.htm?doingId=${doing.identifier}");
            });
    	}else{
    		GUOGUO.memberLogin();
    	}
        
    }

    //回复
    function replyMe(name, replyCommentId) {
    	if(GUOGUO.checkLogin()){
    		$("#reply_comment_id").val(replyCommentId);
        	$("#commentText").val("回复@" + name + ":")
    	}else{
    		GUOGUO.memberLogin();
    	}
        
    }

    //评论
    function doingComment() {
        $("#div_doing_comment").load("getDoingComment.htm?doingId=${doing.identifier}");
    }

    //分享
    function showShare(id) {
        $("#share_" + id).toggle();
    }
</script>
</body>
</html>
